
#include "stdafx.h"
#include "WicBitmapClipper.h"

CWicBitmapClipper::CWicBitmapClipper()
{
    m_pIWICBitmapClipper = NULL;
}

CWicBitmapClipper::~CWicBitmapClipper()
{
    if(m_pIWICBitmapClipper)
    {
        m_pIWICBitmapClipper->Release();
    }
    m_pIWICBitmapClipper = NULL;
}

CWicBitmapClipper::CWicBitmapClipper(CWicBitmapClipper const & objBitmapClipper)
{
    m_pIWICBitmapClipper = objBitmapClipper.m_pIWICBitmapClipper;
    m_pIWICBitmapClipper->AddRef();
}

CWicBitmapClipper& CWicBitmapClipper::operator=(CWicBitmapClipper const & objBitmapClipper)
{
    if(m_pIWICBitmapClipper)
    {
        m_pIWICBitmapClipper->Release();
    }
    m_pIWICBitmapClipper = objBitmapClipper.m_pIWICBitmapClipper;
    m_pIWICBitmapClipper->AddRef();
    return *this;
}
